#!/usr/bin/python3.5
# -*- coding utf-8

from selenium import webdriver


def google_driver(url):
    chrome_options = webdriver.ChromeOptions()
    chrome_options.add_argument('--headless')
    chrome_options.add_argument('--no-sandbox')
    chrome_options.add_argument('--disable-gpu')
    client = webdriver.Chrome(chrome_options=chrome_options, executable_path='/usr/local/bin//chromedriver')
    # executable_path谷歌driver的路径
    client.get(url)
    content = client.page_source
    print(content)
    client.quit()
    pass


google_driver('https://www.taobao.com/')
